﻿
<!DOCTYPE html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <link rel="stylesheet"
          href="../../css/table.css" type="text/css">
    <link rel="stylesheet"
          href="../../css/cwcalendar.css" type="text/css">
    <script type="text/javascript"
            src="../../javascript/comm/comm.js">
    </script>
    <script language="javascript"
            src="../../javascript/winopen/winopenm.js">
    </script>
    <script type="text/javascript"
            src="../../javascript/calendar-ch.js">
    </script>
    <script type="text/javascript"
            src="../../javascript/jquery-1.7.2.js">
    </script>
    <script type="text/javascript"
            src="../../javascript/jquery.messager.js">
    </script>
    <script src="../../javascript/time.js"></script>
    <script type="text/javascript"
            src="../../javascript/human_check.js">
    </script>
    <script type="text/javascript"
            src="../../javascript/human_input_check.js">
    </script>
    <script src="~/js/jquery-1.11.1.js"></script>
    <script src="~/js/vue.js"></script>
    <link href="~/css/table.css" rel="stylesheet" />
</head>
<body>
    <div id="app">
        <form id="form1">
            <table width="100%">
                <tr>
                    <td>
                        <font color="black">您正在做的业务是：人力资源--人力资源档案管理--人力资源档案变更 </font>
                    </td>
                </tr>
                <tr>
                    <td align="right">
                        <input type="button" value="确认变更" class="BUTTON_STYLE1" v-on:click="UpdHuman()">
                        <input type="button" value="返回" class="BUTTON_STYLE1"
                               onclick="history.back()">
                    </td>
                </tr>
            </table>
            <table width="100%" border="1" cellpadding=3 cellspacing=1
                   bordercolorlight=#848284 bordercolordark=#eeeeee
                   class="TABLE_STYLE1" v-for="(item,index) in dt">
                <tr>
                    <td class="TD_STYLE1" width="10%">
                        档案编号
                    </td>
                    <td colspan="6" class="TD_STYLE2">
                        {{item.human_id}}
                        <input type="hidden" name="huf_id" :value="item.huf_id" class="INPUT_STYLE2" />
                    </td>
                    <td rowspan="6" width="13%" style="text-align: center;">
                        <img src="../../images/regular.jpg" style="width:120px;height:150px;" />
                    </td>
                </tr>
                <tr>
                    <td class="TD_STYLE1" width="10%">
                        I级机构
                    </td>
                    <td width="13%" class="TD_STYLE2">
                        {{item.first_kind_name}}
                    </td>
                    <td width="10%" class="TD_STYLE1">
                        II级机构
                    </td>
                    <td width="13%" class="TD_STYLE2">
                        {{item.second_kind_name}}
                    </td>
                    <td width="10%" class="TD_STYLE1">
                        III级机构
                    </td>
                    <td class="TD_STYLE2" colspan="2" width="2%">
                        {{item.third_kind_name}}
                    </td>
                </tr>
                <tr>
                    <td class="TD_STYLE1">
                        职位分类
                    </td>
                    <td class="TD_STYLE2">
                        {{item.human_major_kind_name}}
                    </td>
                    <td class="TD_STYLE1">
                        职位名称
                    </td>
                    <td class="TD_STYLE2">
                        {{item.hunma_major_name}}
                    </td>
                    <td class="TD_STYLE1">
                        职称
                    </td>
                    <td colspan="2" class="TD_STYLE2">
                        <select name="human_pro_designation" :value="item.human_pro_designation" id="human_pro_designation" class="SELECT_STYLE1">
                            <option value="软件工程师" selected>软件工程师</option>
                            <option value="助理">助理</option>
                            <option value="经理">经理</option>
                            <option value="员工">员工</option>
                            <option value="开发员">开发员</option>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td class="TD_STYLE1">
                        姓名
                    </td>
                    <td class="TD_STYLE2">
                        <input type="text" id="human_name" :value="item.human_name" name="human_name" class="INPUT_STYLE2" />
                    </td>
                    <td class="TD_STYLE1">
                        性别
                    </td>
                    <td class="TD_STYLE2">
                        <select name="human_sex" class="SELECT_STYLE1" :value="item.human_sex" id="human_sex">
                            <option value="男" selected="selected">
                                男
                            </option>
                            <option value="女">
                                女
                            </option>
                        </select>
                    </td>
                    <td class="TD_STYLE1">
                        EMAIL
                    </td>
                    <td colspan="2" class="TD_STYLE2">
                        <input type="text" name="human_email" :value="item.human_email" id="human_email"
                               class="INPUT_STYLE2">
                    </td>
                </tr>
                <tr>
                    <td class="TD_STYLE1">
                        电话
                    </td>
                    <td class="TD_STYLE2">
                        <input type="text" name="human_telephone" :value="item.human_telephone" id="human_telephone"
                               class="INPUT_STYLE2">
                    </td>
                    <td class="TD_STYLE1">
                        QQ
                    </td>
                    <td class="TD_STYLE2">
                        <input type="text" :value="item.human_qq" name="human_qq" id="human_qq"
                               class="INPUT_STYLE2">
                    </td>
                    <td class="TD_STYLE1">
                        手机
                    </td>
                    <td colspan="2" class="TD_STYLE2">
                        <input type="text" name="human_mobilephone" :value="item.human_mobilephone" id="human_mobilephone"
                               class="INPUT_STYLE2">
                    </td>
                </tr>
                <tr>
                    <td class="TD_STYLE1">
                        住址
                    </td>
                    <td colspan="3" class="TD_STYLE2">
                        <input type="text" name="human_address" :value="item.human_address" id="human_address"
                               class="INPUT_STYLE2">
                    </td>
                    <td class="TD_STYLE1">
                        邮编
                    </td>
                    <td colspan="2" class="TD_STYLE2">
                        <input type="text" class="INPUT_STYLE2" :value="item.human_postcode" id="human_postcode" name="human_postcode" />

                    </td>
                </tr>
                <tr>
                    <td class="TD_STYLE1">
                        国籍
                    </td>
                    <td class="TD_STYLE2">
                        <select name="human_nationality" id="human_nationality" :value="item.human_nationality" class="SELECT_STYLE1">
                            <option value="中国" selected>中国</option>
                            <option value="美国">美国</option>
                            <option value="英国">英国</option>
                            <option value="法国">法国</option>
                        </select>
                    </td>
                    <td class="TD_STYLE1">
                        出生地
                    </td>
                    <td class="TD_STYLE2">
                        <input type="text" class="INPUT_STYLE2" :value="item.human_birthplace" id="human_birthplace" name="human_birthplace" />

                    </td>
                    <td class="TD_STYLE1">
                        生日
                    </td>
                    <td width="13%" class="TD_STYLE2">
                        <input type="date" name="human_birthday" :value="item.human_birthday"
                               class="INPUT_STYLE2" id="birthday">
                    </td>
                    <td width="10%" class="TD_STYLE1">
                        民族
                    </td>
                    <td class="TD_STYLE2">
                        <select name="human_race" class="SELECT_STYLE1" :value="item.human_race">
                            <option value="汉族" selected>汉族</option>
                            <option value="回族">回族</option>
                            <option value="藏族">藏族</option>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td class="TD_STYLE1">
                        宗教信仰
                    </td>
                    <td class="TD_STYLE2">
                        <select name="human_religion" class="SELECT_STYLE1" :value="item.human_religion">
                            <option value="无" selected>无</option>
                            <option value="佛教">佛教</option>
                            <option value="基督教">基督教</option>
                        </select>
                    </td>
                    <td class="TD_STYLE1">
                        政治面貌
                    </td>
                    <td class="TD_STYLE2">
                        <select name="human_party" class="SELECT_STYLE1" :value="item.human_party">
                            <option value="群众" selected>群众</option>
                            <option value="党员">党员</option>
                        </select>
                    </td>
                    <td class="TD_STYLE1">
                        身份证号码
                    </td>
                    <td class="TD_STYLE2">
                        <input type="text" :value="item.human_id_card" class="INPUT_STYLE2" id="human_id_card" name="human_id_card" />

                    </td>
                    <td class="TD_STYLE1">
                        社会保障号码
                    </td>
                    <td class="TD_STYLE2">
                        <input type="text" :value="item.human_society_security_id" class="INPUT_STYLE2" id="human_society_security_id" name="human_society_security_id" />

                    </td>
                </tr>
                <tr>
                    <td class="TD_STYLE1">
                        年龄
                    </td>
                    <td class="TD_STYLE2">
                        <input type="text" class="INPUT_STYLE2" :value="item.human_age" id="human_age" name="human_age" />

                    </td>
                    <td class="TD_STYLE1">
                        学历
                    </td>
                    <td class="TD_STYLE2">
                        <select name="human_educated_degree" :value="item.human_educated_degree" class="SELECT_STYLE1">
                            <option value="高中" selected>高中</option>
                            <option value="本科">本科</option>
                            <option value="大专">大专</option>
                        </select>
                    </td>
                    <td class="TD_STYLE1">
                        教育年限
                    </td>
                    <td class="TD_STYLE2">
                        <select name="human_educated_years" :value="item.human_educated_years" class="SELECT_STYLE1">
                            <option value="12" selected>12</option>
                            <option value="16">16</option>
                        </select>
                    </td>
                    <td class="TD_STYLE1">
                        学历专业
                    </td>
                    <td class="TD_STYLE2">
                        <select name="human_educated_major" :value="item.human_educated_major" class="SELECT_STYLE1">
                            <option value="生物工程" selected>生物工程</option>
                            <option value="计算机">计算机</option>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td class="TD_STYLE1">
                        薪酬标准
                    </td>
                    <td class="TD_STYLE2">
                        <select name="salary_standard_id" id="salary_standard_id" class="SELECT_STYLE1">
                            <option v-for="(item,index) in salary" v-on:click="salary_sum(item.salary_sum)" :value="item.standard_id">{{item.standard_name}}</option>
                        </select>
                        <input type="text" hidden id="salary_standard_name" name="salary_standard_name" />
                        <input type="text" hidden id="salary_sum" name="salary_sum" />
                    </td>
                    <td class="TD_STYLE1">
                        开户行
                    </td>
                    <td class="TD_STYLE2">
                        <input type="text" class="INPUT_STYLE2" :value="item.human_bank" id="human_bank" name="human_bank" />

                    </td>
                    <td class="TD_STYLE1">
                        帐号
                    </td>
                    <td class="TD_STYLE2">
                        <input type="text" class="INPUT_STYLE2" :value="item.human_account" id="human_account" name="human_account" />

                    </td>
                    <td class="TD_STYLE1">
                        复核人
                    </td>
                    <td class="TD_STYLE2">
                        <input type="text" name="checker" id="checker" :value="item.checker"
                               class="INPUT_STYLE2">
                    </td>
                </tr>
                <tr>
                    <td class="TD_STYLE1">
                        复核时间
                    </td>
                    <td class="TD_STYLE2">
                        <input type="text" name="check_time" :value="item.check_time" id="check_time" readonly="readonly"
                               class="INPUT_STYLE2">
                    </td>
                    <td class="TD_STYLE1">
                        特长
                    </td>
                    <td class="TD_STYLE2">
                        <select name="human_speciality" :value="item.human_speciality" class="SELECT_STYLE1">
                            <option value="java" selected>java</option>
                            <option value="数据库">数据库</option>
                            <option value="HTML">HTML</option>
                        </select>
                    </td>
                    <td class="TD_STYLE1">
                        爱好
                    </td>
                    <td class="TD_STYLE2">
                        <select name="human_hobby" :value="item.human_hobby" class="SELECT_STYLE1">
                            <option value="篮球" selected>篮球</option>
                            <option value="跳舞">跳舞</option>
                            <option value="乒乓球">乒乓球</option>
                        </select>
                    </td>
                    <td class="TD_STYLE1">
                        &nbsp;
                    </td>
                    <td class="TD_STYLE2">
                        &nbsp;
                    </td>
                </tr>
                @*<tr>
                        <td class="TD_STYLE1">
                            档案附件
                        </td>
                        <td colspan="7" class="TD_STYLE2">
                            <a href="javascript:winopenm('query.jsp?filename=')">a.doc</a>
                        </td>
                    </tr>*@
                <tr>
                    <td class="TD_STYLE1">
                        个人履历
                    </td>
                    <td colspan="7" class="TD_STYLE2">
                        <textarea name="human_histroy_records " rows="4" :value="item.human_histroy_records " readonly
                                  class="TEXTAREA_STYLE1"></textarea>
                    </td>
                </tr>
                <tr>
                    <td class="TD_STYLE1">
                        家庭关系信息
                    </td>
                    <td colspan="7" class="TD_STYLE2">
                        <textarea name="human_family_membership" rows="4" :value="item.human_family_membership" readonly
                                  class="TEXTAREA_STYLE1"></textarea>
                    </td>
                </tr>
                <tr>
                    <td class="TD_STYLE1">
                        备注
                    </td>
                    <td colspan="7" class="TD_STYLE2">
                        <textarea name="remark" rows="4" :value="item.remark" readonly class="TEXTAREA_STYLE1"></textarea>
                    </td>
                </tr>
            </table>
        </form>
    </div>
</body>
<script type="text/javascript">
    var vm = new Vue({
        el: "#app",
        data: {
            salary:[],
            dt: [],
        },
        methods: {
            load: function () {
                var t = this;
                $.ajax({
                    url: "/HumanResources/GetUpdOne",
                    type: "Get",
                    data: "id="+@ViewData["id"],
                    success: function (msg) {
                        var dts = eval("(" + msg + ")");
                        t.salary = dts["salary"];
                        t.dt = dts["dt"];
                    }
                })
            },
            salary_sum: function (sum, standard_name) {
                $("#salary_standard_name").val(standard_name);
                $("#salary_sum").val(sum);
            },
            UpdHuman: function () {
                var t = this;
                $.ajax({
                    url: "/HumanResources/UpdHuman",
                    type: "Get",
                    data: $("#form1").serialize(),
                    success: function (msg) {
                        if (msg > 0) {
                            alert('人力资源成功变更！');
                            window.location.href = '/HumanResources/success';
                        } else {
                            alert('变更失败');
                        }
                    }
                })
            }
        },
        mounted: function () {
            this.load();

        },
        filters: {
            cdate: function (d) {
                var time = new Date(d);
                var y = time.getFullYear();
                var m = time.getMonth() + 1;
                if (m < 10) {
                    m = "0" + m;
                }
                var d = time.getDate();
                if (d < 10) {
                    d = "0" + d;
                }
                return y + "-" + m + "-" + d;
            }
        }
    })
</script>
<script type="text/javascript">
    function time() {
        var tdate = document.getElementById("change_time ");
        var d = new Date();
        var y = d.getFullYear();
        var moth = d.getMonth() + 1;
        var date = d.getDate();
        var h = d.getHours();
        var m = d.getMinutes();
        var s = d.getSeconds();
        var hh = 20 - 1 - h;
        var mm = 60 - 1 - m;
        var ss = 60 - s;
        if (hh > 0) {
            mm = mm + 60 * hh;
        }
        if (moth < 10) {
            moth = "0" + moth;
        }
        if (date < 10) {
            date = "0" + date;
        }
        if (h < 10) {
            h = "0" + h;
        }
        if (m < 10) {
            m = "0" + m;
        }
        if (s < 10) {
            s = "0" + s;
        }
        if (mm < 10) {
            mm = "0" + mm;
        }
        if (ss < 10) {
            ss = "0" + ss;
        }

        tdate.value = y + "-" + moth + "-" + date + " " + h + ":" + m + ":" + s;

    }
    var out = window.setInterval(time, 1000);
</script>
